/**
 * 
 */
package com.nikolvas.man;

/**
 * @author vnikolenko
 *
 */
public enum Age {

	a12(12),
	a13(13),
	a14(14),
	a15(15),
	a16(16),
	a17(17);
	
	private Age(double d){
		this.a = d;
	}
	
	private double a;
	
	public static Age getAgeByVal(double age){
		for( Age a : Age.values() ){
			if( a.getAge() == age )
				return a;
		}
		throw new RuntimeException("Not age with value "+String.valueOf(age));
	}
	public double getAge(){
		return a;
	}
	
}
